/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165;

import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;

/**
 *
 * @author Matúš
 */
@Stateless
public class ReaderService implements ReaderServiceLocal {
    
    @EJB
    private ReaderDAOLocal readerDAO;
    
    @Override
    public Reader createReader(Reader reader) {
        return readerDAO.createReader(reader);
    }

    @Override
    public List<Reader> findAllReaders() {
        return readerDAO.findAllReaders();
    }
    
    @Override
    public Reader findReaderByEmail(String email) {
        return readerDAO.findReaderByEmail(email);
    }
    
    @Override
    public void updateReader(Reader reader) {
        readerDAO.updateReader(reader);
    }
    
    @Override
    public void deleteReader(Reader reader) {
        readerDAO.deleteReader(reader);
    }
}
